package cn.xpf.study.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Create on 2021/5/15
 *
 * @author shuxinsheng@qiyi.com
 **/
public class TimeUtil {

    public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    public static String getTimeStr(Date date) {
        try {
            return sdf.format(date);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

}
